#!/usr/bin/env python
# encoding: utf-8
'''
@author: luohui
@license: (C) Copyright 2013-2018.
@contact: 254272115@qq.com
@software: personal
@file: readConfig.py
@time: 2018/9/29 10:49
@desc:
'''
import yaml
import os

# 配置文件路径
base_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'config')
config_file_path = os.path.join(base_dir, 'caps.yaml')


class ReadConfig(object):
    # 返回配置文件中的所有数据项
    def __init__(self):
        pass

    @classmethod
    def get_data(cls):
        with open(config_file_path, 'r', encoding='utf-8') as f:
            data = yaml.load(f)
        return data

if __name__ == '__main__':
    print(ReadConfig.get_data())
